# coding=utf-8
import configparser
import sys
import requests
from multiprocessing import Queue

def get_content(to_url):
    cf = configparser.ConfigParser()
    cf.read("./config/post.conf")
    cookie = cf.get("cookie", "cookie")
    cookdic = dict(Cookie=cookie)

    try:
        req = requests.get(to_url,cookies = cookdic, timeout=100)
    except:
        return None
    if req.status_code != 200:
        print("haven't get 200, status_code is: "+str(req.status_code))
        sys.exit(-1)
    return req


#tmpContent = get_content("http://tieba.baidu.com/f/user/json_userinfo")
#print(tmpContent.text)
